<?php
	include_once("inc/conn.php");
  include_once("inc/function.php"); 
  include_once("inc/config.php"); 
	include_once("heheadmin\inc/config.php"); 
	login_check();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>保时捷28,蛋蛋28,加拿大28,幸运28,PC蛋蛋,<?php echo $web_name ;?></title>
<?php 
    require 'public/title.inc.php';
?>
<link rel="stylesheet" type="text/css" href="style/gift.css" />
<link rel="stylesheet" type="text/css" href="style/yj_index.css" />
<style type="text/css">
  body {font-family: "微软雅黑";background: #2b2b2b;}
  #gift {margin: 20px auto;margin-top: 103px;}
  #Content {width: 1018px;margin: auto;padding-top: 25px;padding-bottom: 30px;overflow: hidden;min-height: 700px;background: #4a4a4a;}
  .yj_color{background: #4a4a4a;color: white;}
  .thumbnail{display: block;padding: 4px;margin-bottom: 20px;line-height: 1.42857143;background-color: #fff;border: 1px solid #ddd;border-radius: 4px;-webkit-transition: border .2s ease-in-out;-o-transition: border .2s ease-in-out;transition: border .2s ease-in-out;background: #4a4a4a;}
  .thumbnail .caption{padding: 9px;color: white;}
  .container {min-width: 1170px;max-width: 1170px;margin: 0 auto;min-height: 660px;}
</style>
</head>
<? include_once("top2.php");?>

<div id="gift">
    <div class="container">
          <div class="row" style="background: #4a4a4a;margin-left: 1px;">
              <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3" style="display: none;">  
                <div class="panel panel-default yj_color">
                    <div class="panel-heading" style="color: white;">热门兑换奖品 | Popular Gifts</div>
                    <div class="panel-body">
                      <?
                        $i=0;
                      $query=$db->query("Select * from exchange_cardtype Order by card_type desc limit 2");
                      while($rs=$db->fetch_array($query)){
                          $i++;
                      ?>
                        <div class="thumbnail">
                          <img src="<?=ChangeEncodeG2U($rs['card_img'])?>" alt="">
                          <div class="caption">
                            <h3><?=ChangeEncodeG2U($rs['card_name'])?></h3>
                            <p><span class="dou"><?=ChangeEncodeG2U($rs['card_price'])?></span></p>
                            <p><a href="proexchang.php?id=<?=ChangeEncodeG2U($rs['card_type'])?>" class="btn btn-danger btn-block" role="button">立即兑换</a></p>
                          </div>
                        </div>   
                      <?}?>
                    </div>
                </div>  
              </div>
              <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="panel panel-default">
                    <div class="panel-heading" style="background: #4a4a4a;color: white;">商品列表</div>
                    <div class="panel-body">
                        <div class="row" style="background: #4a4a4a;">
                          <?
                            $i=0;
                          $query=$db->query("Select * from exchange_cardtype Order by card_type desc limit 6");
                          while($rs=$db->fetch_array($query)){
                              $i++;
                          ?>
                            <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
                                  <div class="thumbnail">
                                    <img src="<?=ChangeEncodeG2U($rs['card_img'])?>" alt="100元">
                                    <div class="caption">
                                      <h3><?=ChangeEncodeG2U($rs['card_name'])?></h3>
                                      <p><span class="dou"><?=ChangeEncodeG2U($rs['card_price'])?></span></p>
                                      <p><a href="proexchang.php?id=<?=ChangeEncodeG2U($rs['card_type'])?>" class="btn btn-danger btn-block" role="button">立即兑换</a></p>
                                    </div>
                                  </div>
                              </div>
                          <?}?>
                        </div>
                    </div>
                </div>  
              </div>
          </div>        
    </div>
</div>




<? include_once("yj_footer.php"); ?>
</body>
</html>
